The present invention relates generally to the field of displaying video graphics. More particularly, the present invention is a method and apparatus for processing video graphics data to prevent xe2x80x9csparklingxe2x80x9d on a video display while processing the video graphics.
The display sub-system of a computer graphics controller normally contains a memory known as a palette or a look up table (LUT). As pixel data is read from the graphics controller frame buffer and processed for display on the monitor, one of the processing steps is to look up the pixel data in the palette. This permits the graphics controller to perform color depth expansion or color corrections, such as gamma correction. For example, in an 8 bit per pixel display mode, the palette is used to expand the 8 bit per pixel data in the frame buffer into 24 bits per pixel for the display. In a 24 bit per pixel display mode, the palette can operate as a gamma correction unit.
A core requirement of a palette is that the host CPU be able to program the palette and re-program the palette as desired. This can involve reading data from the palette or writing new data into the palette. The host CPU reading and writing of the palette must be able to occur concurrently with the normal graphic display.
In order for both the display reads and the host CPU READ or WRITE operation to occur at the same time, a dual-ported memory could be implemented to store the palette data. A dual-ported memory permits two addresses within the memory to be accessed simultaneously, thereby permitting two READs or a combination of READs and WRITEs to be performed concurrently. However, dual-ported memories are much larger then single-port memories and are expensive to implement in silicon. For this reason, a single-ported memory is commonly used for the palette function and access arbitration logic is added to determine whether the graphics display process or the host CPU READ or WRITE request gets access to the single memory port for a particular clock cycle. Although the arbitration logic permits the use of the palette by both the graphics display process and the host CPU, there is a negative effect on the graphics display process when the host CPU wins an arbitration and interrupts the display process. This negative effect is known as xe2x80x9csparklingxe2x80x9d.
Early prior art graphics controllers did nothing to address the problem. These controllers permitted the data that was output from the palette to the host CPU READ or WRITE process to appear on the display. For example, if the display raster was in a black area of the display and a white data value was read or written by the host CPU, then a white xe2x80x9csparklexe2x80x9d appeared on the display.
Subsequent graphics controllers attempted to ameliorate this sparkle effect by using anti-sparkle circuits which tried to hide the sparkle effect. Anti-sparkle circuits perform what is known as a xe2x80x9cdot-stretchxe2x80x9d, which uses the color of the previous pixel on the display to cover the pixel where the host CPU READ or WRITE operation occurred within the palette. For the prior example where the raster was in a black area of the display, the previous and current pixels would both normally be black. Accordingly, when the host CPU READ or WRITE operation pertains to a white data value from the palette, the previous black pixel will be stretched to cover the white pixel value and the user does not observe the sparkle on the display.
A drawback with anti-sparkle circuits which use this approach is that a visible artifact will be displayed on the screen whenever the previous and current pixels are not the same (or similar) in color. For those applications which perform palette updates often, such as palette cycling for changing the color of a drawn object without re-drawing the object, by changing the palette entries corresponding to the values with which the object was drawn, the standard dot-stretch anti-sparkle method can have serious negative consequences to the graphics that are output to the display.
Accordingly, there exists a need for a system which permits a single-port palette to be utilized by both the graphics display process and a host CPU while limiting the visible artifacts which are displayed by the graphics process to the user.
The present invention is an advancement over prior standard dot-stretch anti-sparkle techniques by analyzing the stream of display pixels to determine an optimal time for performing the dot-stretch operation. The system searches the stream of display pixels for a current and previous pixel that are the same color. The system then performs the host access and the dot-stretch during the pixel match. If a pixel match is not detected within a predetermined period of time, the search for two matching pixels is abandoned and the dot-stretch process is implemented.